<template>
    <div class="totalbox">
        <div style="text-align: center;">调整用户积分</div>
        <div style="display: flex; justify-content: center;">
            <div>积分：</div>
            <div style="width:500px"><el-input v-model="input1" placeholder="输入要调整的积分，减少在数字前加-号，增加无需在数字前加符号" /></div>
        </div>
        <div style="display: flex;justify-content: center">
            <div>备注：</div>
            <div style="width:500px"> <el-input v-model="input" placeholder="Please input" /></div>
        </div>
        <div style="width: 100px;align-items: center;margin: 0 auto;"><el-button type="success"
                style="align-items: center; " @click="editdata()" >保存</el-button></div>
    </div>
</template>

<script setup lang="ts">

import { ref } from 'vue';
import { editjifen } from '../../api/membersettingApi'

import { useCounterStore } from '@/stores/counter'
import { storeToRefs } from 'pinia'
const store = useCounterStore()
const { count } = storeToRefs(store)

const input = ref()
const input1 = ref(1)
let editdata = async () => {
    console.log(typeof(Number(input.value)))
    let get = await editjifen({
        alterIntegral: Number(input1.value),
        remark: input.value,
        vipId: count.value
    })
    if (get.data.code) {
       console.log(get)

    }
}

// let isSelected1 = ref(false);
// let isSelected2 = ref(false);
// let isSelected3 = ref(false);
// let isSelected4 = ref(false);



    // isSelected1.value = comName === 'Jibenxinxi';
    // isSelected2.value = comName === 'Jiaoyimingxi';
    // isSelected3.value = comName === 'Yuemingxi';
    // isSelected4.value = comName === 'Jifenmingxi';

</script>
<style scoped>
.totalbox {
    height: 400px;
    border-radius: 8px;


}


.main {
    width: 70%;
    height: 100%;
}

.main-body {
    height: calc(100% - 54px);
    display: flex;
    border-top: 1px solid color(srgb 0.9 0.9 0.9);
    border-width: 1px;
}
</style>